// routes.js
const express = require('express');
const verifyToken = require('./isToken.js');

const router = express.Router();

// 用于验证 token 的路由
router.get('/protected', verifyToken, (req, res) => {
  res.json({ message: 'Token is valid', user: req.user });
});

module.exports = router;